Skip to content

feat: task cancel/resume support and search model combobox#6

Open
mathieu0905 wants to merge 2 commits intoVisionXLab:mainfrom
mathieu0905:feat/task-resume-and-model-combobox
Open

feat: task cancel/resume support and search model combobox#6
mathieu0905 wants to merge 2 commits intoVisionXLab:mainfrom
mathieu0905:feat/task-resume-and-model-combobox

Conversation

@mathieu0905
Copy link

Summary

  • Search Model 下拉框支持自定义输入:select + 自定义文本框联动,选"自定义..."后可输入任意模型名
  • 任务取消后可恢复:cancel 通过 asyncio.Task.cancel() 强制终止,Phase 级别文件存在性检查自动跳过已完成阶段
  • 从结果文件夹恢复任务:启动时写入 _task_meta.json,结果面板显示"恢复"按钮,支持换模型后续跑
  • 恢复前自动保存 UI 配置:确保取消→改模型→恢复能正确使用新配置

Test plan

  • Search Model 下拉选择预设模型 → 正常启动
  • Search Model 选"自定义..."→ 输入自定义模型名 → 正常启动
  • 运行中取消任务 → 显示恢复按钮 → 点击恢复 → 从中断处继续
  • 取消后修改模型 → 恢复 → 确认使用新模型
  • 结果面板 → 有 _task_meta.json 的文件夹显示恢复按钮 → 点击恢复
  • Phase 1 完成后取消 → 恢复 → Phase 1 被跳过,直接执行 Phase 2

🤖 Generated with Claude Code

mathieu0905 and others added 2 commits March 17, 2026 16:17
- Search Model dropdown now supports custom input (select + text input)
- Cancel task properly resets state via asyncio.Task.cancel + CancelledError handling
- Resume from in-memory state: cancel → change config → resume picks up with latest config
- Resume from result folder: saves _task_meta.json, skips completed phases by checking output files
- Results panel shows "恢复" button for folders with task metadata
- Resume button saves current UI config before resuming

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant